<?php
/*
 * Created on Apr 17, 2012
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
?>
<div align="center" style="width:100%;margin-top:20px;">
<h3>Champions</h3>
<table border="1" width="50%" class="resultgrid">
	<tr>
		<td align="center">Year</td>
		<td align="center">Champion</td>
	</tr>
	<?php if(count($champList) > 0){
		foreach ($champList as $row){?>
			<tr>
				<?php
					printf("<td align=\"center\"><a href=\"?viewResultByYear&eventid=%s\">%s</a></td>",$row["eventid"],$row["year"]);
					printf("<td align=\"center\"><a href=\"index.php?viewProfile&playerid=%s\">%s %s</a></td>",$row["playerid"],$row["firstname"],$row["lastname"]);
				?>
			</tr>
		<?php }	
	}else{?>
		<tr>
			<td colspan="2" align="center">
				No result found.
			</td>
		</tr>
	<?php }?>
</table>
</div>
<div style="width:100%;margin-top:20px;" align="center">
	<div style="width:48%;float:left">
		<h3>Sure shot winners</h3>
		<table border="1" width="50%" class="resultgrid">
			<tr>
				<td align="center">Year</td>
				<td align="center">Player</td>
				<td align="center"># of hole-in-one</td>
			</tr>
			<?php if(count($champList) > 0){
				foreach($sureshotwinners as $row){?>
					<tr>
						<?php
							printf("<td align=\"center\"><a href=\"?viewResultByYear&eventid=%s\">%s</a></td>",$row["eventid"],$row["year"]);
							printf("<td align=\"center\"><a href=\"index.php?viewProfile&playerid=%s\">%s %s</a></td>",$row["playerid"],$row["firstname"],$row["lastname"]);
							printf("<td align=\"center\">%s</td>",$row["grand_holein1"]);
						?>
					</tr>
				<?php }
			}else{?>
				<tr>
					<td colspan="3" align="center">
						No result found.
					</td>
				</tr>
			<?php }?>
		</table>
	</div>
	<div style="width:48%;float:left">
		<h1>Right</h1>
	</div>
</div>